package cheesymock;

import java.lang.reflect.*;

/**
 * {@link Mock} implementation using {@link InvocationHandler}.
 *
 * @author fredrik
 */
public class SimpleMock extends Mock implements InvocationHandler {

	public SimpleMock(Class<?> interfaceToImplement, Validator[] validators, Object delegate, 
			DefaultReturn defaultReturn) {
		super(interfaceToImplement, validators, delegate, defaultReturn);
	}

	public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable {
		return doInvoke(proxy, method, arguments != null ? arguments : new Object[0]);
	}
}